Option Explicit
Dim objWMIService, objProcess, colProcess
Dim StrComp, StrNameProcess 
StrComp = "."
StrNameProcess = "'calc.exe'" 

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _ 
& StrComp & "\root\cimv2") 

Set colProcess = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = " & StrNameProcess )
For Each objProcess in colProcess
objProcess.Terminate()
Next 
WScript.Quit 